<?php 
defined('IN_TS') or die('Access Denied.');
//回到顶部插件 
function floatlayer(){
	echo '<div class="destroy">
	<div class="sheet">
		<div class="head">
			<h2>游客，欢迎来到ThinkSAAS社区</h2>
		</div>
		<div class="body"></div>
		<a href="#" title="关闭" class="close"></a>
	</div>
</div>
<script>
$(document).ready(function(){
	var h = $(document).height();
	$(".overlay").css({"height": h });	
	//$(".action").click(function(){
		$(".overlay").css({\'display\':\'block\'}).animate({\'opacity\':\'0.8\'});
		$(".destroy").stop(true).animate({\'margin-top\':\'40px\',\'opacity\':\'1\'},400);
	//});
	$(".close").click(function(){
		$(".destroy").stop(true).animate({\'margin-top\':\'-292px\',\'opacity\':\'0\'},800);
		$(".overlay").css({\'display\':\'none\'}).animate({\'opacity\':\'0\'});
	});
});
</script>';
}

function floatlayer_css(){
	echo '<link href="'.SITE_URL.'plugins/pubs/floatlayer/style.css" rel="stylesheet" type="text/css" />';
}

addAction('floatlayers', 'floatlayer');
addAction('pub_header_top','floatlayer_css');